package com.toKnow.service;

import com.toKnow.model.entity.*;
import org.springframework.transaction.annotation.Transactional;

public interface ArticlePubService {

    Integer addArticle(ArticlePub articlePub,  UserInfoPub userInfoPub);
    Integer storeArticle(ArticlePub articlePub, UserInfoPub userInfoPub);
    Integer updateDraft(Integer draftId, ArticlePub articlePub, UserInfoPub userInfoPub);

    int addArticleTag(ArticleTagPub articleTagPub);
    int storeArticleTag(ArticleTagPub articleTagPub);

    int addArticleType(ArticleTypePub articleTypePub);
    int storeArticleType(ArticleTypePub articleTypePub);

    int moveArticleToColumn(Integer article_id,Integer column_id );

    int answerArticleComment(ArticleCommentAnswerPub articleCommentAnswerPub);

    int commentArticle(ArticleCommentPub articleCommentPub,Integer article_id,UserInfoPub userInfoPub);

    int likeArticle(ArticleLikePub articleLikePub,Integer article_id,Integer author_id);

    int likeComment(ArticleCommentLikePub articleCommentLikePub,Integer comment_id);

    int likeAnswer(ArticleAnswerLikePub articleAnswerLikePub,Integer answer_id);

    Integer findAuthor(Integer article_id);

}
